<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupGetGlobal</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
	text-decoration: underline;
}
</style>
</head>
<body>

<h2>IupGetGlobal</h2>
<p>Returns an attribute value from the global 
  environment. The value can be returned from the driver or from the internal storage.</p>
<h3>
Parameters/Return</h3>
<pre>char *IupGetGlobal(const char *<strong>name</strong>); [in C]
iup.GetGlobal(<strong>name</strong>: string) -&gt; <strong>value</strong>: string [in Lua]</pre>
<p><strong>name</strong>: name of the attribute.</p>
<p><span class="style1">Returns:</span> the attribute value. 
  If the attribute does not exist, NULL (nil in Lua) is returned.</p>
<h3>Notes</h3>
<p>This function&#8217;s return value is not 
  necessarily the same one used by the application to set the attribute&#8217;s value.</p>
<p>The returned value is not 
  necessarily the same pointer used by the application to define the attribute value.&nbsp;The pointers of internal IUP attributes 
  returned by <strong>IupGetGlobal</strong> should <b>never</b> be freed or changed, 
except when it is a custom application pointer that was stored using <strong>
IupSetGlobal</strong> and allocated by the application.</p>

<p>&nbsp;The returned pointer can be used safely even if <strong>IupGetGlobal</strong> 
or <strong>IupGetAttribute</strong> are called several times. But not too many 
times, because it is an internal buffer and after IUP may reuse it after around 
50 calls.</p>
<p><a href="iupgetattribute.html">IupGetAttribute</a> can also be used to get global attributes, just set the element to NULL.</p>
<h3>See Also</h3>
<p>&nbsp;<a href="iupsetglobal.html">IupSetGlobal</a>,
<a href="../attrib/iup_globals.html">Global Attributes</a></p>

</body>

</html>
